<?php

class FavController extends Controller
{
	public $layout='//layouts/view';
	
	public function actionIndex()
	{
		$this->render('fav');
	}
	
	public function actionDetail($id)
	{
		$list = new CActiveDataProvider('Fav', array(
			'criteria'=>array(
				'condition'=>'id = '.$id
			),
			'pagination'=>array(
				'pageSize'=>1
			)
		));
		$list = $list->getData();
		$this->render('detail', array(
			'model'=>$list[0]
		));
	}

	public function getFavList()
	{
		return new CActiveDataProvider('Fav', array(
			'criteria'=>array(
				'condition'=>''
			),
			'pagination'=>array(
				'pageSize'=>1000
			)
		));
	}
}